import store from "../store/index";
// import { addData } from "../util/data";

// const search = {
//   name: "百度",
//   icon: chrome.runtime.getURL("assets/icon/baidu.svg"),
//   search: "https://www.baidu.com/s?&tn=68018901_2_oem_dg&ie=utf-8&wd=",
// };
// store.commit("search", search);

// const menuItems = [
//   { icon: "🏠", text: "首页" },
//   { icon: "💬", text: "聊天" },
//   { icon: "📊", text: "统计" },
//   { icon: "👤", text: "个人中心" },
//   { icon: "📱", text: "设置" },
// ];
// store.commit("setmenuItems", menuItems);

// store.commit("dock", true);

// const setselectedmenuItems = { icon: "🏠", text: "首页" };
// store.commit("setselectedmenuItems", setselectedmenuItems);

// const data = [
//   {
//     name: "知乎",
//     urlobj: {
//       name: "知乎",
//       url: "https://www.zhihu.com/search?type=content&q=",
//       icon: chrome.runtime.getURL("assets/icon/zhihu.svg"),
//     },
//     layout: { x: "1", y: "1", backgroundcolor: "fuchsia" },
//   },
//   {
//     name: "开发者搜索",
//     urlobj: {
//       name: "开发者搜索",
//       url: "https://kaifa.baidu.com/searchPage?wd=",
//       icon: chrome.runtime.getURL("assets/icon/kaifabaidu.svg"),
//     },
//     layout: { x: "1", y: "1", backgroundcolor: "indigo" },
//   },
//   {
//     name: "豆瓣",
//     urlobj: {
//       name: "豆瓣",
//       url: "https://www.douban.com/search?q=",
//       icon: chrome.runtime.getURL("assets/icon/douban.svg"),
//     },
//     layout: { x: "1", y: "1", backgroundcolor: "sienna" },
//   },
//   {
//     name: "头条搜索",
//     urlobj: {
//       name: "头条搜索",
//       url: "https://so.toutiao.com/search?dvpf=pc&keyword=",
//       icon: chrome.runtime.getURL("assets/icon/toutiao.svg"),
//     },
//     layout: { x: "1", y: "1", backgroundcolor: "darkgreen" },
//   },
// ];

// addData("设置", data);
// eslint-disable-next-line
const data = [
  {
    children: [
      {
        name: "百度",
        backgroundColor: "#ffffff",
        component: null,
        type: "icon",
        src: chrome.runtime.getURL("assets/icon/baidu.svg"),
        url: "https://www.baidu.com/s?&tn=68018901_2_oem_dg&ie=utf-8&wd=",
        size: "1x1",
        id: "1",
        childrens: [],
      },
      {
        name: "Google",
        backgroundColor: "#ffffff",
        component: null,
        type: "icon",
        src: chrome.runtime.getURL("assets/icon/google.svg"),
        url: "https://www.google.com/search?q=",
        size: "1x1",
        id: "2",
        childrens: [],
      },
      {
        name: "Yandex",
        backgroundColor: "#ffffff",
        component: null,
        type: "icon",
        src: chrome.runtime.getURL("assets/icon/yandex.svg"),
        url: "https://yandex.com/search/?text=",
        size: "1x1",
        id: "3",
        childrens: [],
      },
      {
        name: "必应",
        backgroundColor: "#ffffff",
        component: null,
        type: "icon",
        src: chrome.runtime.getURL("assets/icon/bing.svg"),
        url: "https://www.bing.com/search?q=",
        size: "1x1",
        id: "4",
        childrens: [],
      },
      {
        name: "360搜索",
        backgroundColor: "#ffffff",
        component: null,
        type: "icon",
        src: chrome.runtime.getURL("assets/icon/360.svg"),
        url: "https://www.so.com/s?q=",
        size: "1x1",
        id: "5",
        childrens: [],
      },
      {
        name: "搜狗",
        backgroundColor: "#ffffff",
        component: null,
        type: "icon",
        src: chrome.runtime.getURL("assets/icon/sougou.svg"),
        url: "https://www.sogou.com/sogou?query=",
        size: "1x1",
        id: "6",
        childrens: [],
      },
      {
        name: "秘塔AI",
        backgroundColor: "#ffffff",
        component: null,
        type: "icon",
        src: chrome.runtime.getURL("assets/icon/metaso.svg"),
        url: "https://metaso.cn/?s=itab1&q=",
        size: "1x1",
        id: "7",
        childrens: [],
      },
      {
        name: "豆瓣",
        backgroundColor: "#ffffff",
        component: null,
        type: "icon",
        src: chrome.runtime.getURL("assets/icon/douban.svg"),
        url: "https://www.douban.com/search?q=",
        size: "1x1",
        id: "17",
        childrens: [],
      },
      {
        name: "头条搜索",
        backgroundColor: "#ffffff",
        component: null,
        type: "icon",
        src: chrome.runtime.getURL("assets/icon/toutiao.svg"),
        url: "https://so.toutiao.com/search?dvpf=pc&keyword=",
        size: "1x1",
        id: "18",
        childrens: [],
      },
    ],
    icon: "icon-wode",
    id: "1",
    name: "主页",
  },
  {
    children: [
      {
        name: "百度",
        backgroundColor: "#ffffff",
        component: null,
        type: "icon",
        src: chrome.runtime.getURL("assets/icon/baidu.svg"),
        url: "https://www.baidu.com/s?&tn=68018901_2_oem_dg&ie=utf-8&wd=",
        size: "1x1",
        id: "1",
        childrens: [],
      },
      {
        name: "Google",
        backgroundColor: "#ffffff",
        component: null,
        type: "icon",
        src: chrome.runtime.getURL("assets/icon/google.svg"),
        url: "https://www.google.com/search?q=",
        size: "1x1",
        id: "2",
        childrens: [],
      },
      {
        name: "Yandex",
        backgroundColor: "#ffffff",
        component: null,
        type: "icon",
        src: chrome.runtime.getURL("assets/icon/yandex.svg"),
        url: "https://yandex.com/search/?text=",
        size: "1x1",
        id: "3",
        childrens: [],
      },
      {
        name: "必应",
        backgroundColor: "#ffffff",
        component: null,
        type: "icon",
        src: chrome.runtime.getURL("assets/icon/bing.svg"),
        url: "https://www.bing.com/search?q=",
        size: "1x1",
        id: "4",
        childrens: [],
      },
      {
        name: "360搜索",
        backgroundColor: "#ffffff",
        component: null,
        type: "icon",
        src: chrome.runtime.getURL("assets/icon/360.svg"),
        url: "https://www.so.com/s?q=",
        size: "1x1",
        id: "5",
        childrens: [],
      },
      {
        name: "搜狗",
        backgroundColor: "#ffffff",
        component: null,
        type: "icon",
        src: chrome.runtime.getURL("assets/icon/sougou.svg"),
        url: "https://www.sogou.com/sogou?query=",
        size: "1x1",
        id: "6",
        childrens: [],
      },
      {
        name: "秘塔AI",
        backgroundColor: "#ffffff",
        component: null,
        type: "icon",
        src: chrome.runtime.getURL("assets/icon/metaso.svg"),
        url: "https://metaso.cn/?s=itab1&q=",
        size: "1x1",
        id: "7",
        childrens: [],
      },
      {
        name: "抖音",
        backgroundColor: "#ffffff",
        component: null,
        type: "icon",
        src: chrome.runtime.getURL("assets/icon/douyin.svg"),
        url: "https://www.douyin.com/search/%s?ug_source=lenovo_stream",
        size: "1x1",
        id: "8",
        childrens: [],
      },
    ],
    icon: "icon-dizhi",
    id: "2",
    name: "娱乐",
  },
  {
    children: [],
    icon: "icon-meishi",
    id: "3",
    name: "游戏",
  },
];
store.commit("setnavconfig", data);
